CREATE TABLE "users" (
	"id" serial NOT NULL,
	"name" varchar(255) NOT NULL,
	"email" varchar(255) NOT NULL,
	"password" varchar(255) NOT NULL,
	"updated_at" TIMESTAMPTZ,
	"created_at" TIMESTAMPTZ,
	PRIMARY KEY("id")
);

CREATE TABLE "goals" (
	"id" serial NOT NULL,
	"user_id" int,
	"goal_name" varchar(255),
	"goal_amount" decimal,
	"goal-end-date" date,
	"updated_at" TIMESTAMPTZ,
	"created_at" TIMESTAMPTZ,
	PRIMARY KEY("id")
);

ALTER TABLE "goals"
ADD FOREIGN KEY("user_id") REFERENCES "users"("id")
ON UPDATE NO ACTION ON DELETE NO ACTION;